The present invention relates to the field of data processing. In particular, the invention relates to a technique for tracking speculative execution of instructions for a register renaming data store in a data processing apparatus.
A program instruction may identify a register storing a data value to be processed. Register renaming is a technique used to map an architectural register specifier identified by a program instruction to a physical register specifier identifying a physical register of the processing apparatus. Register renaming can improve processing performance by removing some of the data dependency restrictions which constrain scheduling of instruction execution. For example, two instructions which identify the same architectural register specifier can have their architectural register specifiers mapped to different physical register specifiers to eliminate the data dependency hazard, allowing the instructions to be executed in parallel or out-of-order.
Sometimes while executing a program, a point of execution (referred to herein as a “speculation point” or “speculation node”) may be reached after which there are several possible instructions which could be executed. Which instruction is executed next may depend on the result of an earlier instruction, which may not have completed yet, in which case waiting for the result of that instruction would cause a delay in processing. Therefore, to improve performance one of the possible instructions can be executed speculatively before it is known which instruction should actually have been executed, so that if the correct instruction is chosen then the delay can be avoided. If the wrong instruction is executed speculatively, then the processing pipeline can be flushed and the system can be restored to the state in which the processor was before the speculation point.
In a system using register renaming, it is sometimes desirable to track the occurrence of the speculation points. The present technique seeks to improve the efficiency of tracking the speculation points while performing register renaming.